import { Controller, Get, UseGuards } from '@nestjs/common';
import { MicrosoftBearerGuard } from 'src/auth/microsoft-bearer.guard';
import { UserDec } from 'src/decorators/User.decorator';
import { User } from 'src/entities/user.entity';

@Controller()
export class MeController {
  // eslint-disable-next-line @typescript-eslint/no-empty-function
  constructor() {}

  @Get('me')
  @UseGuards(MicrosoftBearerGuard)
  getMe(@UserDec() user: User) {
    return user;
  }
}
